const path = require('path')
// disableEsLint 禁用EsLint
// const {disableEsLint, addDecoratorsLegacy, override} = require('customize-cra')
const {
  disableEsLint, 
  addDecoratorsLegacy, 
  override,
  addWebpackAlias,
  fixBabelImports
} = require('customize-cra')



module.exports = override(
    disableEsLint(),  //禁用EsLint
    addDecoratorsLegacy(),  //让react支持装饰器写法 @
    addWebpackAlias({
      ['@']:path.join(__dirname,'src'),
      ['$css']:path.join(__dirname,'src/assets/css')
    }), //设置导入别名
    // antd-mobile按需加载
    fixBabelImports('import', {
      libraryName: 'antd-mobile',
      style: 'css',
    }),
)